package cn.stylefeng.guns.modular.project.mapper;

import cn.stylefeng.guns.modular.project.entity.ProjectMemberWork;
import cn.stylefeng.guns.modular.project.model.params.ProjectMemberWorkParam;
import cn.stylefeng.guns.modular.project.model.result.ProjectMemberWorkResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author
 * @since 2019-10-21
 */
public interface ProjectMemberWorkMapper extends BaseMapper<ProjectMemberWork> {

    /**
     * 获取列表
     *
     * @author
     * @Date 2019-10-21
     */
    List<ProjectMemberWorkResult> customList(@Param("paramCondition") ProjectMemberWorkParam paramCondition);

    /**
     * 获取map列表
     *
     * @author
     * @Date 2019-10-21
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ProjectMemberWorkParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author
     * @Date 2019-10-21
     */
    Page<ProjectMemberWorkResult> customPageList(@Param("page") Page page, @Param("paramCondition") ProjectMemberWorkParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author
     * @Date 2019-10-21
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ProjectMemberWorkParam paramCondition);

    Integer sumWorkHour(@Param("projectId") int projectId);

    Integer sumWorkHour1(@Param("projectId") int projectId, @Param("userId") Long userId);

    String findLastWorkDate(@Param("paramCondition") ProjectMemberWorkParam paramCondition);

    List<ProjectMemberWorkResult> findWorkHourByProject(@Param("paramCondition") ProjectMemberWorkParam paramCondition);
}
